home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
STRINGS
/
PACKAGE6
/
INTEGER.DOC
< prev
next >
Wrap
Text File
|
1990-07-25
|
2KB
|
44 lines
------------------------------------------------------------------------------
ReadlnInteger
------------------------------------------------------------------------------
declaration: procedure ReadlnInteger (var IntegerNumber:
integer;
var LastKey:
TypeKey);
purpose: return an integer number and the last key the user input
from the keyboard.
precondition: none
postcondition: - Maxint <= IntegerNumber <= Maxint
Lastkey is either EscapeKey or CarriageReturn
special cases: if input is larger than -Maxint or Maxint then
the computer will not accepted any number and will
beep to warn the user of overflow error.
The User will have option of using the BackSpace
Key to delete any number that he or she has been typed
in the keyboard.
example: var
IntegerNumber:
integer;
LastKey:
Typekey;
begin
.
.
.
ReadlnInteger (InputNumber, LastKey);
writeln (output, InputNumber);
.
.
.
end
-----------------------------------------------------------------------------